Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State Trait refactor #7

Merged
merged 8 commits into from
Oct 14, 2024
Merged

State Trait refactor #7

merged 8 commits into from
Oct 14, 2024

Conversation

mkatychev
Copy link
Contributor

@mkatychev mkatychev commented Sep 16, 2024

Refactored state trait so that it holds an Input associated type:

rex-sm/src/lib.rs

Lines 32 to 37 in 534388d

/// A trait for types representing state machine lifecycles. These types should be field-less
/// enumerations or enumerations whose variants only contain field-less enumerations; note that
/// `Copy` is a required supertrait.
pub trait State: fmt::Debug + Send + PartialEq + Copy {
type Input: Send + Sync + 'static + fmt::Debug;
}

This allows a state/input association to be held at a lower level than Kind allowing inner states & inputs to have their own logic without implementing Rex or Kind

@mergify mergify bot added the feature label Sep 16, 2024
@mkatychev mkatychev marked this pull request as ready for review September 17, 2024 15:31
@mkatychev mkatychev marked this pull request as draft September 17, 2024 19:43
@mkatychev mkatychev marked this pull request as ready for review September 24, 2024 16:04
@mkatychev mkatychev merged commit 8bee7b5 into main Oct 14, 2024
2 checks passed
@mergify mergify bot deleted the feat/state-trait-input branch October 14, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants